#存储顾客所点pizza的信息
pizza = {
    'crust':'thick',
    'toppings':['mushrooms','cheese']#字典里存储列表
}

#概述顾客点的pizza
print(f'You ordered a {pizza['crust']}-crust pizza with the following toppings:')
for topping in pizza['toppings']:
    print(f'\t{topping}')

#每当字典里的一个键包含多个值时,都可以用列表进行存储
favorite_languages = {
    'jen':['python','rust'],
    'sarah':['c'],
    'edward':['rust','go'],
    'phil':['python','haskell']
}
for name,languages in favorite_languages.items():
    if len(languages) < 2:
        print(f'\n{name.title()}\'s favorite language is')
    else:
        print(f'\n{name.title()}\'s favorite languages are')
    for language in languages:
        print(f'\t{language.title()}')